from django.urls import converters
from django.urls.converters import StringConverter
class UsernameLenConverter(StringConverter):
    regex = r'^[A-Za-z0-9_-]{5,20}$'
    def to_python(self,value):
        return int(value)
    def to_url(self,value):
        return value

